package builder;

import builder.director.MobileDirector;
import builder.itf.MobileBuilderImpl1;
import builder.itf.MobileBuilderImpl2;
import builder.model.MobilePackage;

public class BuilderClient {

	public static void main(String[] args) {
		MobileDirector mobileDirector = new MobileDirector();

		MobileBuilderImpl1 mobileBuilderImpl1 = new MobileBuilderImpl1();
		MobileBuilderImpl2 mobileBuilderImpl2 = new MobileBuilderImpl2();

		printMessage(mobileDirector.createMobilePackage(mobileBuilderImpl1));
		printMessage(mobileDirector.createMobilePackage(mobileBuilderImpl2));
	}

	private static void printMessage(MobilePackage mobilePackage) {
		StringBuilder sb = new StringBuilder("----话费：");
		sb.append(mobilePackage.getMoney()).append(",短信：").append(mobilePackage.getShortInfo()).append("，彩铃：")
				.append(mobilePackage.getMusic());
		System.out.println(sb.toString());
	}

}
